package DesignPatern.A18_备忘录模式.A03_高级模式;

/**
 * @Author: Du
 * @Date: 2021/8/6 15:02
 */
public class A01_Main
{
    public static void main(String[] args)
    {
        History history = new History();
        Document document = new Document();
        document.change("aaa");
        history.add(document.save());
        
        document.change("bbb");
        history.add(document.save());
    
        document.change("ccc");
    
        document.change("ddd");
        
        document.resume(history.getLastVersion());
        document.print();
        
        document.resume(history.getLastVersion());
        document.print();
    }
}
